home *** CD-ROM | disk | FTP | other *** search
- FADE.TPU -=- Turbo Pascal Fading Routine -=- By Mike Schutz
- September, 1994
-
- Hello, fellow Pascal programmers. This is probably the smallest
- Turbo Pascal Unit in distribution, so I'm going to try to make the
- "documentation" as short as the code is.
-
- First of all, as in all things, I am not responsible with what
- you do with this, and I am not responsible for what happens when you
- do whatever you do with it. In other words, it works fine on my
- computer, it should work on yours, but I make no gaurantee.
-
- The unit contains two interfaced procedures. These follow:
- PROCEDURE FadeOut;
- PROCEDURE ResetTextMode;
-
- PROCEDURE FadeOut simply fades the screen to black. Simple enough?
- Ok, I'll explain in terribly boring detail: The palette of the screen
- is sequentially adjusted towards zero. The R, G, and B values are
- simply decremented until they reach a state of zero. And we all know
- what happens when there is no red or green or blue on your screen.
-
- PROCEDURE ResetTextMode does exactally what it says, too. You
- really shouldn't have too much use for this one unless you can't figure
- out how to get back to text mode. This is painfully simple, so I'll
- show you what it looks like:
- PROCEDURE ResetTextMode;
- BEGIN
- asm
- mov ax,03h
- int 10h
- end;
- END;
- I'm almost embarrased to include such simple code, but I guess
- probably are some people out there who are less educated in the field
- than I am (and believe me, if you know something, we're about on the
- same level.. <grin>).
-
- Well, this is getting to be almost as long as the code itself, so
- I'm going to wrap it up here. I've included FADEAWAY.PAS, a generic,
- cheesy, pointless little program that fades away the screen and dumps
- you back to text mode. Enjoy yourselves.
- I've got plenty more where this came from, so if I ever get off my
- lazy butt and document something, you can find it wherever you found
- this. Cya.
-
- And if for any reason you would want to get back to me, you can
- reach me via Internet at:
- mschutz@cap.gwu.edu
-
-